#include "AlarmParam.h"

#include <float.h>
#include <limits.h>

//拷贝参数值
void SAlarmParam::CopyFrom(SAlarmParam* that)
{
    if (0 == that) return;
    if (this == that) return;

    CopyWarn(that);
    CopyAlarm(that);
    CopyProt(that);
    CopyWarnHC(that);
    CopyAlarmHC(that);
    CopyProtHC(that);
}

void SAlarmParam::CopyWarn(SAlarmParam* that)
{
    this->fBankVolUpLimitWarn = that->fBankVolUpLimitWarn;
    this->fBankVolDownLimitWarn = that->fBankVolDownLimitWarn;
    this->fChargeCurUpLimitWarn = that->fChargeCurUpLimitWarn;
    this->fDischargeCurUpLimitWarn = that->fDischargeCurUpLimitWarn;
    this->fSglVolUpLimitWarn = that->fSglVolUpLimitWarn;
    this->fSglVolDownLimitWarn = that->fSglVolDownLimitWarn;
    this->fChargeSglTempUpLimitWarn = that->fChargeSglTempUpLimitWarn;
    this->fChargeSglTempDownLimitWarn = that->fChargeSglTempDownLimitWarn;
    this->fDchargeSglTempUpLimitWarn = that->fDchargeSglTempUpLimitWarn;
    this->fDchargeSglTempDownLimitWarn = that->fDchargeSglTempDownLimitWarn;
    this->fSglTempUpLimitWarn = that->fSglTempUpLimitWarn;
    this->fSglTempDownLimitWarn = that->fSglTempDownLimitWarn;
    this->fEnvTempUpLimitWarn = that->fEnvTempUpLimitWarn;
    this->fEnvTempDownLimitWarn = that->fEnvTempDownLimitWarn;
    this->fPowerLineTempUpLimitWarn = that->fPowerLineTempUpLimitWarn;
    this->fBankSocUpLimitWarn = that->fBankSocUpLimitWarn;
    this->fBankSocDownLimitWarn = that->fBankSocDownLimitWarn;
    this->fPosResDownLimitWarn = that->fPosResDownLimitWarn;
    this->fNegResDownLimitWarn = that->fNegResDownLimitWarn;
    this->fPackVolDiffUpLimitWarn = that->fPackVolDiffUpLimitWarn;
    this->fPackTempDiffUpLimitWarn = that->fPackTempDiffUpLimitWarn;
    this->fBankVolDiffUpLimitWarn = that->fBankVolDiffUpLimitWarn;
    this->fPackVolUpLimitWarn = that->fPackVolUpLimitWarn;
    this->fPackVolDownLimitWarn = that->fPackVolDownLimitWarn;
    this->fCellVolDiffUpLimitWarn = that->fCellVolDiffUpLimitWarn;
    this->fCellTempDiffUpLimitWarn = that->fCellTempDiffUpLimitWarn;
    this->fModuleVolDiffUpLimitWarn = that->fModuleVolDiffUpLimitWarn;
    this->fHvPowerLineTempUpLimitWarn = that->fHvPowerLineTempUpLimitWarn;
    this->fResWarn1 = that->fResWarn1;
    this->fResWarn2 = that->fResWarn2;
    this->fResWarn3 = that->fResWarn3;
    this->fResWarn4 = that->fResWarn4;
}

void SAlarmParam::CopyAlarm(SAlarmParam* that)
{
    this->fBankVolUpLimitAlarm = that->fBankVolUpLimitAlarm;
    this->fBankVolDownLimitAlarm = that->fBankVolDownLimitAlarm;
    this->fChargeCurUpLimitAlarm = that->fChargeCurUpLimitAlarm;
    this->fDischargeCurUpLimitAlarm = that->fDischargeCurUpLimitAlarm;
    this->fSglVolUpLimitAlarm = that->fSglVolUpLimitAlarm;
    this->fSglVolDownLimitAlarm = that->fSglVolDownLimitAlarm;
    this->fChargeSglTempUpLimitAlarm = that->fChargeSglTempUpLimitAlarm;
    this->fChargeSglTempDownLimitAlarm = that->fChargeSglTempDownLimitAlarm;
    this->fDchargeSglTempUpLimitAlarm = that->fDchargeSglTempUpLimitAlarm;
    this->fDchargeSglTempDownLimitAlarm = that->fDchargeSglTempDownLimitAlarm;
    this->fSglTempUpLimitAlarm = that->fSglTempUpLimitAlarm;
    this->fSglTempDownLimitAlarm = that->fSglTempDownLimitAlarm;
    this->fEnvTempUpLimitAlarm = that->fEnvTempUpLimitAlarm;
    this->fEnvTempDownLimitAlarm = that->fEnvTempDownLimitAlarm;
    this->fPowerLineTempUpLimitAlarm = that->fPowerLineTempUpLimitAlarm;
    this->fBankSocUpLimitAlarm = that->fBankSocUpLimitAlarm;
    this->fBankSocDownLimitAlarm = that->fBankSocDownLimitAlarm;
    this->fPosResDownLimitAlarm = that->fPosResDownLimitAlarm;
    this->fNegResDownLimitAlarm = that->fNegResDownLimitAlarm;
    this->fPackVolDiffUpLimitAlarm = that->fPackVolDiffUpLimitAlarm;
    this->fPackTempDiffUpLimitAlarm = that->fPackTempDiffUpLimitAlarm;
    this->fBankVolDiffUpLimitAlarm = that->fBankVolDiffUpLimitAlarm;
    this->fPackVolUpLimitAlarm = that->fPackVolUpLimitAlarm;
    this->fPackVolDownLimitAlarm = that->fPackVolDownLimitAlarm;
    this->fCellVolDiffUpLimitAlarm = that->fCellVolDiffUpLimitAlarm;
    this->fCellTempDiffUpLimitAlarm = that->fCellTempDiffUpLimitAlarm;
    this->fModuleVolDiffUpLimitAlarm = that->fModuleVolDiffUpLimitAlarm;
    this->fHvPowerLineTempUpLimitAlarm = that->fHvPowerLineTempUpLimitAlarm;
    this->fResAlarm1 = that->fResAlarm1;
    this->fResAlarm2 = that->fResAlarm2;
    this->fResAlarm3 = that->fResAlarm3;
    this->fResAlarm4 = that->fResAlarm4;
}

void SAlarmParam::CopyProt(SAlarmParam* that)
{
    this->fBankVolUpLimitProt = that->fBankVolUpLimitProt;
    this->fBankVolDownLimitProt = that->fBankVolDownLimitProt;
    this->fChargeCurUpLimitProt = that->fChargeCurUpLimitProt;
    this->fDischargeCurUpLimitProt = that->fDischargeCurUpLimitProt;
    this->fSglVolUpLimitProt = that->fSglVolUpLimitProt;
    this->fSglVolDownLimitProt = that->fSglVolDownLimitProt;
    this->fChargeSglTempUpLimitProt = that->fChargeSglTempUpLimitProt;
    this->fChargeSglTempDownLimitProt = that->fChargeSglTempDownLimitProt;
    this->fDchargeSglTempUpLimitProt = that->fDchargeSglTempUpLimitProt;
    this->fDchargeSglTempDownLimitProt = that->fDchargeSglTempDownLimitProt;
    this->fSglTempUpLimitProt = that->fSglTempUpLimitProt;
    this->fSglTempDownLimitProt = that->fSglTempDownLimitProt;
    this->fEnvTempUpLimitProt = that->fEnvTempUpLimitProt;
    this->fEnvTempDownLimitProt = that->fEnvTempDownLimitProt;
    this->fPowerLineTempUpLimitProt = that->fPowerLineTempUpLimitProt;
    this->fBankSocUpLimitProt = that->fBankSocUpLimitProt;
    this->fBankSocDownLimitProt = that->fBankSocDownLimitProt;
    this->fPosResDownLimitProt = that->fPosResDownLimitProt;
    this->fNegResDownLimitProt = that->fNegResDownLimitProt;
    this->fPackVolDiffUpLimitProt = that->fPackVolDiffUpLimitProt;
    this->fPackTempDiffUpLimitProt = that->fPackTempDiffUpLimitProt;
    this->fBankVolDiffUpLimitProt = that->fBankVolDiffUpLimitProt;
    this->fPackVolUpLimitProt = that->fPackVolUpLimitProt;
    this->fPackVolDownLimitProt = that->fPackVolDownLimitProt;
    this->fCellVolDiffUpLimitProt = that->fCellVolDiffUpLimitProt;
    this->fCellTempDiffUpLimitProt = that->fCellTempDiffUpLimitProt;
    this->fModuleVolDiffUpLimitProt = that->fModuleVolDiffUpLimitProt;
    this->fHvPowerLineTempUpLimitProt = that->fHvPowerLineTempUpLimitProt;
    this->fResProt1 = that->fResProt1;
    this->fResProt2 = that->fResProt2;
    this->fResProt3 = that->fResProt3;
    this->fResProt4 = that->fResProt4;
}

void SAlarmParam::CopyWarnHC(SAlarmParam* that)
{
    this->fBankVolUpLimitWarnHC = that->fBankVolUpLimitWarnHC;
    this->fBankVolDownLimitWarnHC = that->fBankVolDownLimitWarnHC;
    this->fChargeCurUpLimitWarnHC = that->fChargeCurUpLimitWarnHC;
    this->fDischargeCurUpLimitWarnHC = that->fDischargeCurUpLimitWarnHC;
    this->fSglVolUpLimitWarnHC = that->fSglVolUpLimitWarnHC;
    this->fSglVolDownLimitWarnHC = that->fSglVolDownLimitWarnHC;
    this->fChargeSglTempUpLimitWarnHC = that->fChargeSglTempUpLimitWarnHC;
    this->fChargeSglTempDownLimitWarnHC = that->fChargeSglTempDownLimitWarnHC;
    this->fDchargeSglTempUpLimitWarnHC = that->fDchargeSglTempUpLimitWarnHC;
    this->fDchargeSglTempDownLimitWarnHC = that->fDchargeSglTempDownLimitWarnHC;
    this->fSglTempUpLimitWarnHC = that->fSglTempUpLimitWarnHC;
    this->fSglTempDownLimitWarnHC = that->fSglTempDownLimitWarnHC;
    this->fEnvTempUpLimitWarnHC = that->fEnvTempUpLimitWarnHC;
    this->fEnvTempDownLimitWarnHC = that->fEnvTempDownLimitWarnHC;
    this->fPowerLineTempUpLimitWarnHC = that->fPowerLineTempUpLimitWarnHC;
    this->fBankSocUpLimitWarnHC = that->fBankSocUpLimitWarnHC;
    this->fBankSocDownLimitWarnHC = that->fBankSocDownLimitWarnHC;
    this->fPosResDownLimitWarnHC = that->fPosResDownLimitWarnHC;
    this->fNegResDownLimitWarnHC = that->fNegResDownLimitWarnHC;
    this->fPackVolDiffUpLimitWarnHC = that->fPackVolDiffUpLimitWarnHC;
    this->fPackTempDiffUpLimitWarnHC = that->fPackTempDiffUpLimitWarnHC;
    this->fBankVolDiffUpLimitWarnHC = that->fBankVolDiffUpLimitWarnHC;
    this->fPackVolUpLimitWarnHC = that->fPackVolUpLimitWarnHC;
    this->fPackVolDownLimitWarnHC = that->fPackVolDownLimitWarnHC;
    this->fCellVolDiffUpLimitWarnHC = that->fCellVolDiffUpLimitWarnHC;
    this->fCellTempDiffUpLimitWarnHC = that->fCellTempDiffUpLimitWarnHC;
    this->fModuleVolDiffUpLimitWarnHC = that->fModuleVolDiffUpLimitWarnHC;
    this->fHvPowerLineTempUpLimitWarnHC = that->fHvPowerLineTempUpLimitWarnHC;
    this->fResWarnHC1 = that->fResWarnHC1;
    this->fResWarnHC2 = that->fResWarnHC2;
    this->fResWarnHC3 = that->fResWarnHC3;
    this->fResWarnHC4 = that->fResWarnHC4;
}

void SAlarmParam::CopyAlarmHC(SAlarmParam* that)
{
    this->fBankVolUpLimitAlarmHC = that->fBankVolUpLimitAlarmHC;
    this->fBankVolDownLimitAlarmHC = that->fBankVolDownLimitAlarmHC;
    this->fChargeCurUpLimitAlarmHC = that->fChargeCurUpLimitAlarmHC;
    this->fDischargeCurUpLimitAlarmHC = that->fDischargeCurUpLimitAlarmHC;
    this->fSglVolUpLimitAlarmHC = that->fSglVolUpLimitAlarmHC;
    this->fSglVolDownLimitAlarmHC = that->fSglVolDownLimitAlarmHC;
    this->fChargeSglTempUpLimitAlarmHC = that->fChargeSglTempUpLimitAlarmHC;
    this->fChargeSglTempDownLimitAlarmHC = that->fChargeSglTempDownLimitAlarmHC;
    this->fDchargeSglTempUpLimitAlarmHC = that->fDchargeSglTempUpLimitAlarmHC;
    this->fDchargeSglTempDownLimitAlarmHC = that->fDchargeSglTempDownLimitAlarmHC;
    this->fSglTempUpLimitAlarmHC = that->fSglTempUpLimitAlarmHC;
    this->fSglTempDownLimitAlarmHC = that->fSglTempDownLimitAlarmHC;
    this->fEnvTempUpLimitAlarmHC = that->fEnvTempUpLimitAlarmHC;
    this->fEnvTempDownLimitAlarmHC = that->fEnvTempDownLimitAlarmHC;
    this->fPowerLineTempUpLimitAlarmHC = that->fPowerLineTempUpLimitAlarmHC;
    this->fBankSocUpLimitAlarmHC = that->fBankSocUpLimitAlarmHC;
    this->fBankSocDownLimitAlarmHC = that->fBankSocDownLimitAlarmHC;
    this->fPosResDownLimitAlarmHC = that->fPosResDownLimitAlarmHC;
    this->fNegResDownLimitAlarmHC = that->fNegResDownLimitAlarmHC;
    this->fPackVolDiffUpLimitAlarmHC = that->fPackVolDiffUpLimitAlarmHC;
    this->fPackTempDiffUpLimitAlarmHC = that->fPackTempDiffUpLimitAlarmHC;
    this->fBankVolDiffUpLimitAlarmHC = that->fBankVolDiffUpLimitAlarmHC;
    this->fPackVolUpLimitAlarmHC = that->fPackVolUpLimitAlarmHC;
    this->fPackVolDownLimitAlarmHC = that->fPackVolDownLimitAlarmHC;
    this->fCellVolDiffUpLimitAlarmHC = that->fCellVolDiffUpLimitAlarmHC;
    this->fCellTempDiffUpLimitAlarmHC = that->fCellTempDiffUpLimitAlarmHC;
    this->fModuleVolDiffUpLimitAlarmHC = that->fModuleVolDiffUpLimitAlarmHC;
    this->fHvPowerLineTempUpLimitAlarmHC = that->fHvPowerLineTempUpLimitAlarmHC;
    this->fResAlarmHC1 = that->fResAlarmHC1;
    this->fResAlarmHC2 = that->fResAlarmHC2;
    this->fResAlarmHC3 = that->fResAlarmHC3;
    this->fResAlarmHC4 = that->fResAlarmHC4;
}

void SAlarmParam::CopyProtHC(SAlarmParam* that)
{
    this->fBankVolUpLimitProtHC = that->fBankVolUpLimitProtHC;
    this->fBankVolDownLimitProtHC = that->fBankVolDownLimitProtHC;
    this->fChargeCurUpLimitProtHC = that->fChargeCurUpLimitProtHC;
    this->fDischargeCurUpLimitProtHC = that->fDischargeCurUpLimitProtHC;
    this->fSglVolUpLimitProtHC = that->fSglVolUpLimitProtHC;
    this->fSglVolDownLimitProtHC = that->fSglVolDownLimitProtHC;
    this->fChargeSglTempUpLimitProtHC = that->fChargeSglTempUpLimitProtHC;
    this->fChargeSglTempDownLimitProtHC = that->fChargeSglTempDownLimitProtHC;
    this->fDchargeSglTempUpLimitProtHC = that->fDchargeSglTempUpLimitProtHC;
    this->fDchargeSglTempDownLimitProtHC = that->fDchargeSglTempDownLimitProtHC;
    this->fSglTempUpLimitProtHC = that->fSglTempUpLimitProtHC;
    this->fSglTempDownLimitProtHC = that->fSglTempDownLimitProtHC;
    this->fEnvTempUpLimitProtHC = that->fEnvTempUpLimitProtHC;
    this->fEnvTempDownLimitProtHC = that->fEnvTempDownLimitProtHC;
    this->fPowerLineTempUpLimitProtHC = that->fPowerLineTempUpLimitProtHC;
    this->fBankSocUpLimitProtHC = that->fBankSocUpLimitProtHC;
    this->fBankSocDownLimitProtHC = that->fBankSocDownLimitProtHC;
    this->fPosResDownLimitProtHC = that->fPosResDownLimitProtHC;
    this->fNegResDownLimitProtHC = that->fNegResDownLimitProtHC;
    this->fPackVolDiffUpLimitProtHC = that->fPackVolDiffUpLimitProtHC;
    this->fPackTempDiffUpLimitProtHC = that->fPackTempDiffUpLimitProtHC;
    this->fBankVolDiffUpLimitProtHC = that->fBankVolDiffUpLimitProtHC;
    this->fPackVolUpLimitProtHC = that->fPackVolUpLimitProtHC;
    this->fPackVolDownLimitProtHC = that->fPackVolDownLimitProtHC;
    this->fCellVolDiffUpLimitProtHC = that->fCellVolDiffUpLimitProtHC;
    this->fCellTempDiffUpLimitProtHC = that->fCellTempDiffUpLimitProtHC;
    this->fModuleVolDiffUpLimitProtHC = that->fModuleVolDiffUpLimitProtHC;
    this->fHvPowerLineTempUpLimitProtHC = that->fHvPowerLineTempUpLimitProtHC;
    this->fResProtHC1 = that->fResProtHC1;
    this->fResProtHC2 = that->fResProtHC2;
    this->fResProtHC3 = that->fResProtHC3;
    this->fResProtHC4 = that->fResProtHC4;
}

void SAlarmParam::InitToInvalid()
{
    InitToWarn(FLT_MAX);
    InitToAlarm(FLT_MAX);
    InitToProt(FLT_MAX);
    InivalidWarnHC(FLT_MAX);
    InitToAlarmHC(FLT_MAX);
    InitToProtHC(FLT_MAX);
}

void SAlarmParam::InitToZero()
{
    InitToWarn(0.0);
    InitToAlarm(0.0);
    InitToProt(0.0);
    InivalidWarnHC(0.0);
    InitToAlarmHC(0.0);
    InitToProtHC(0.0);
}

void SAlarmParam::InitToValue(float fvalue)
{
    InitToWarn(fvalue);
    InitToAlarm(fvalue);
    InitToProt(fvalue);
    InivalidWarnHC(fvalue);
    InitToAlarmHC(fvalue);
    InitToProtHC(fvalue);
}

void SAlarmParam::InitToWarn(float fvalue)
{
    this->fBankVolUpLimitWarn = fvalue;
    this->fBankVolDownLimitWarn = fvalue;
    this->fChargeCurUpLimitWarn = fvalue;
    this->fDischargeCurUpLimitWarn = fvalue;
    this->fSglVolUpLimitWarn = fvalue;
    this->fSglVolDownLimitWarn = fvalue;
    this->fChargeSglTempUpLimitWarn = fvalue;
    this->fChargeSglTempDownLimitWarn = fvalue;
    this->fDchargeSglTempUpLimitWarn = fvalue;
    this->fDchargeSglTempDownLimitWarn = fvalue;
    this->fSglTempUpLimitWarn = fvalue;
    this->fSglTempDownLimitWarn = fvalue;
    this->fEnvTempUpLimitWarn = fvalue;
    this->fEnvTempDownLimitWarn = fvalue;
    this->fPowerLineTempUpLimitWarn = fvalue;
    this->fBankSocUpLimitWarn = fvalue;
    this->fBankSocDownLimitWarn = fvalue;
    this->fPosResDownLimitWarn = fvalue;
    this->fNegResDownLimitWarn = fvalue;
    this->fPackVolDiffUpLimitWarn = fvalue;
    this->fPackTempDiffUpLimitWarn = fvalue;
    this->fBankVolDiffUpLimitWarn = fvalue;
    this->fPackVolUpLimitWarn = fvalue;
    this->fPackVolDownLimitWarn = fvalue;
    this->fCellVolDiffUpLimitWarn = fvalue;
    this->fCellTempDiffUpLimitWarn = fvalue;
    this->fModuleVolDiffUpLimitWarn = fvalue;
    this->fHvPowerLineTempUpLimitWarn = fvalue;
    this->fResWarn1 = fvalue;
    this->fResWarn2 = fvalue;
    this->fResWarn3 = fvalue;
    this->fResWarn4 = fvalue;
}

void SAlarmParam::InitToAlarm(float fvalue)
{
    this->fBankVolUpLimitAlarm = fvalue;
    this->fBankVolDownLimitAlarm = fvalue;
    this->fChargeCurUpLimitAlarm = fvalue;
    this->fDischargeCurUpLimitAlarm = fvalue;
    this->fSglVolUpLimitAlarm = fvalue;
    this->fSglVolDownLimitAlarm = fvalue;
    this->fChargeSglTempUpLimitAlarm = fvalue;
    this->fChargeSglTempDownLimitAlarm = fvalue;
    this->fDchargeSglTempUpLimitAlarm = fvalue;
    this->fDchargeSglTempDownLimitAlarm = fvalue;
    this->fSglTempUpLimitAlarm = fvalue;
    this->fSglTempDownLimitAlarm = fvalue;
    this->fEnvTempUpLimitAlarm = fvalue;
    this->fEnvTempDownLimitAlarm = fvalue;
    this->fPowerLineTempUpLimitAlarm = fvalue;
    this->fBankSocUpLimitAlarm = fvalue;
    this->fBankSocDownLimitAlarm = fvalue;
    this->fPosResDownLimitAlarm = fvalue;
    this->fNegResDownLimitAlarm = fvalue;
    this->fPackVolDiffUpLimitAlarm = fvalue;
    this->fPackTempDiffUpLimitAlarm = fvalue;
    this->fBankVolDiffUpLimitAlarm = fvalue;
    this->fPackVolUpLimitAlarm = fvalue;
    this->fPackVolDownLimitAlarm = fvalue;
    this->fCellVolDiffUpLimitAlarm = fvalue;
    this->fCellTempDiffUpLimitAlarm = fvalue;
    this->fModuleVolDiffUpLimitAlarm = fvalue;
    this->fHvPowerLineTempUpLimitAlarm = fvalue;
    this->fResAlarm1 = fvalue;
    this->fResAlarm2 = fvalue;
    this->fResAlarm3 = fvalue;
    this->fResAlarm4 = fvalue;
}

void SAlarmParam::InitToProt(float fvalue)
{
    this->fBankVolUpLimitProt = fvalue;
    this->fBankVolDownLimitProt = fvalue;
    this->fChargeCurUpLimitProt = fvalue;
    this->fDischargeCurUpLimitProt = fvalue;
    this->fSglVolUpLimitProt = fvalue;
    this->fSglVolDownLimitProt = fvalue;
    this->fChargeSglTempUpLimitProt = fvalue;
    this->fChargeSglTempDownLimitProt = fvalue;
    this->fDchargeSglTempUpLimitProt = fvalue;
    this->fDchargeSglTempDownLimitProt = fvalue;
    this->fSglTempUpLimitProt = fvalue;
    this->fSglTempDownLimitProt = fvalue;
    this->fEnvTempUpLimitProt = fvalue;
    this->fEnvTempDownLimitProt = fvalue;
    this->fPowerLineTempUpLimitProt = fvalue;
    this->fBankSocUpLimitProt = fvalue;
    this->fBankSocDownLimitProt = fvalue;
    this->fPosResDownLimitProt = fvalue;
    this->fNegResDownLimitProt = fvalue;
    this->fPackVolDiffUpLimitProt = fvalue;
    this->fPackTempDiffUpLimitProt = fvalue;
    this->fBankVolDiffUpLimitProt = fvalue;
    this->fPackVolUpLimitProt = fvalue;
    this->fPackVolDownLimitProt = fvalue;
    this->fCellVolDiffUpLimitProt = fvalue;
    this->fCellTempDiffUpLimitProt = fvalue;
    this->fModuleVolDiffUpLimitProt = fvalue;
    this->fHvPowerLineTempUpLimitProt = fvalue;
    this->fResProt1 = fvalue;
    this->fResProt2 = fvalue;
    this->fResProt3 = fvalue;
    this->fResProt4 = fvalue;
}

void SAlarmParam::InivalidWarnHC(float fvalue)
{
    this->fBankVolUpLimitWarnHC = fvalue;
    this->fBankVolDownLimitWarnHC = fvalue;
    this->fChargeCurUpLimitWarnHC = fvalue;
    this->fDischargeCurUpLimitWarnHC = fvalue;
    this->fSglVolUpLimitWarnHC = fvalue;
    this->fSglVolDownLimitWarnHC = fvalue;
    this->fChargeSglTempUpLimitWarnHC = fvalue;
    this->fChargeSglTempDownLimitWarnHC = fvalue;
    this->fDchargeSglTempUpLimitWarnHC = fvalue;
    this->fDchargeSglTempDownLimitWarnHC = fvalue;
    this->fSglTempUpLimitWarnHC = fvalue;
    this->fSglTempDownLimitWarnHC = fvalue;
    this->fEnvTempUpLimitWarnHC = fvalue;
    this->fEnvTempDownLimitWarnHC = fvalue;
    this->fPowerLineTempUpLimitWarnHC = fvalue;
    this->fBankSocUpLimitWarnHC = fvalue;
    this->fBankSocDownLimitWarnHC = fvalue;
    this->fPosResDownLimitWarnHC = fvalue;
    this->fNegResDownLimitWarnHC = fvalue;
    this->fPackVolDiffUpLimitWarnHC = fvalue;
    this->fPackTempDiffUpLimitWarnHC = fvalue;
    this->fBankVolDiffUpLimitWarnHC = fvalue;
    this->fPackVolUpLimitWarnHC = fvalue;
    this->fPackVolDownLimitWarnHC = fvalue;
    this->fCellVolDiffUpLimitWarnHC = fvalue;
    this->fCellTempDiffUpLimitWarnHC = fvalue;
    this->fModuleVolDiffUpLimitWarnHC = fvalue;
    this->fHvPowerLineTempUpLimitWarnHC = fvalue;
    this->fResWarnHC1 = fvalue;
    this->fResWarnHC2 = fvalue;
    this->fResWarnHC3 = fvalue;
    this->fResWarnHC4 = fvalue;
}

void SAlarmParam::InitToAlarmHC(float fvalue)
{
    this->fBankVolUpLimitAlarmHC = fvalue;
    this->fBankVolDownLimitAlarmHC = fvalue;
    this->fChargeCurUpLimitAlarmHC = fvalue;
    this->fDischargeCurUpLimitAlarmHC = fvalue;
    this->fSglVolUpLimitAlarmHC = fvalue;
    this->fSglVolDownLimitAlarmHC = fvalue;
    this->fChargeSglTempUpLimitAlarmHC = fvalue;
    this->fChargeSglTempDownLimitAlarmHC = fvalue;
    this->fDchargeSglTempUpLimitAlarmHC = fvalue;
    this->fDchargeSglTempDownLimitAlarmHC = fvalue;
    this->fSglTempUpLimitAlarmHC = fvalue;
    this->fSglTempDownLimitAlarmHC = fvalue;
    this->fEnvTempUpLimitAlarmHC = fvalue;
    this->fEnvTempDownLimitAlarmHC = fvalue;
    this->fPowerLineTempUpLimitAlarmHC = fvalue;
    this->fBankSocUpLimitAlarmHC = fvalue;
    this->fBankSocDownLimitAlarmHC = fvalue;
    this->fPosResDownLimitAlarmHC = fvalue;
    this->fNegResDownLimitAlarmHC = fvalue;
    this->fPackVolDiffUpLimitAlarmHC = fvalue;
    this->fPackTempDiffUpLimitAlarmHC = fvalue;
    this->fBankVolDiffUpLimitAlarmHC = fvalue;
    this->fPackVolUpLimitAlarmHC = fvalue;
    this->fPackVolDownLimitAlarmHC = fvalue;
    this->fCellVolDiffUpLimitAlarmHC = fvalue;
    this->fCellTempDiffUpLimitAlarmHC = fvalue;
    this->fModuleVolDiffUpLimitAlarmHC = fvalue;
    this->fHvPowerLineTempUpLimitAlarmHC = fvalue;
    this->fResAlarmHC1 = fvalue;
    this->fResAlarmHC2 = fvalue;
    this->fResAlarmHC3 = fvalue;
    this->fResAlarmHC4 = fvalue;
}

void SAlarmParam::InitToProtHC(float fvalue)
{
    this->fBankVolUpLimitProtHC = fvalue;
    this->fBankVolDownLimitProtHC = fvalue;
    this->fChargeCurUpLimitProtHC = fvalue;
    this->fDischargeCurUpLimitProtHC = fvalue;
    this->fSglVolUpLimitProtHC = fvalue;
    this->fSglVolDownLimitProtHC = fvalue;
    this->fChargeSglTempUpLimitProtHC = fvalue;
    this->fChargeSglTempDownLimitProtHC = fvalue;
    this->fDchargeSglTempUpLimitProtHC = fvalue;
    this->fDchargeSglTempDownLimitProtHC = fvalue;
    this->fSglTempUpLimitProtHC = fvalue;
    this->fSglTempDownLimitProtHC = fvalue;
    this->fEnvTempUpLimitProtHC = fvalue;
    this->fEnvTempDownLimitProtHC = fvalue;
    this->fPowerLineTempUpLimitProtHC = fvalue;
    this->fBankSocUpLimitProtHC = fvalue;
    this->fBankSocDownLimitProtHC = fvalue;
    this->fPosResDownLimitProtHC = fvalue;
    this->fNegResDownLimitProtHC = fvalue;
    this->fPackVolDiffUpLimitProtHC = fvalue;
    this->fPackTempDiffUpLimitProtHC = fvalue;
    this->fBankVolDiffUpLimitProtHC = fvalue;
    this->fPackVolUpLimitProtHC = fvalue;
    this->fPackVolDownLimitProtHC = fvalue;
    this->fCellVolDiffUpLimitProtHC = fvalue;
    this->fCellTempDiffUpLimitProtHC = fvalue;
    this->fModuleVolDiffUpLimitProtHC = fvalue;
    this->fHvPowerLineTempUpLimitProtHC = fvalue;
    this->fResProtHC1 = fvalue;
    this->fResProtHC2 = fvalue;
    this->fResProtHC3 = fvalue;
    this->fResProtHC4 = fvalue;
}
